package com.eight.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 广告位
 * @author 郭坤
 * @since 2023-02-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tbAdvertise", description="广告状态实体类")
@TableName(value = "tb_advertise")
public class TbAdvertise implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @TableField(value = "id")
    private Long id;

    @ApiModelProperty(value = "名字")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "轮播位置")
    @TableField(value = "position_id")
    private Long positionId;

    @ApiModelProperty(value = "图片")
    @TableField(value = "pic")
    private String pic;

    @ApiModelProperty(value = "开始时间")
    @TableField(value = "start_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @TableField(value = "end_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "上下线状态：0->下线；1->上线")
    @TableField(value = "status")
    private Integer status;

    @ApiModelProperty(value = "点击数")
    @TableField(value = "click_count")
    private Integer clickCount;

    @ApiModelProperty(value = "下单数")
    @TableField(value = "order_count")
    private Integer orderCount;

    @ApiModelProperty(value = "链接地址")
    @TableField(value = "url")
    private String url;

    @ApiModelProperty(value = "备注")
    @TableField(value = "note")
    private String note;

    @ApiModelProperty(value = "排序")
    @TableField(value = "sort")
    private Integer sort;


}
